#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main()
{
  char buffer[128] = {0};
  printf("%s\n", getenv("PWD"));
  printf("%s\n", buffer);
  
  chdir("/home/ad/");
  fopen("test.txt","w");
  getcwd(buffer, sizeof(buffer));
  printf("%s\n", buffer);
  
  //sprintf(getenv("PWD"),"%s",buffer);
  printf("%s\n", getenv("PWD"));
  return 0;
}
